package io.github.wppli.domain.recommond.rservice.text;

import org.tartarus.snowball.ext.EnglishStemmer;


public class Stemmer {
    public static String stem(String term) {
        EnglishStemmer stemmer = new EnglishStemmer();
        char[] termChars = term.toCharArray();
        stemmer.setCurrent(termChars, termChars.length);
        stemmer.stem();
        return stemmer.getCurrent();
    }

    public static void main(String[] args) {
        // 要检测的文本
        String text = "人工智能真的能取代程序源码？deepseek比人厉害？";

    }
}